package com.wanlian.router.net.netty2.msg;


import com.wanlian.router.net.netty2.ConstantCode;

/**
 * 数据头
 *
 * @author holl7
 */
public class MsgHead {
    /**
     * 消息的开头的信息标志
     */
    private int head_data = ConstantCode.HEAD_DATA;
    private int msg_type = ConstantCode.COMMON_MSG;
    private int length;
    private int version;

    public MsgHead(int length, int version) {
        this.length = length;
        this.version = version;
    }

    public MsgHead(int length, int version,int msg_type) {
        this.length = length;
        this.version = version;
        this.msg_type=msg_type;
    }

    public int getLength() {
        return length;
    }

    public void setLength(int length) {

        this.length = length;
    }

    public int getVersion() {
        return version;
    }

    public void setVersion(int version) {
        this.version = version;
    }

    public int getHead_data() {
        return head_data;
    }

    public void setHead_data(int head_data) {
        this.head_data = head_data;
    }

    public int getHeadData() {
        return this.head_data;
    }

    public int getMsgType() {
        return this.msg_type;
    }

    public void setMsgType(int msgType) {
        this.msg_type = msgType;
    }
}
